/**
 * The MIT License (MIT)
 * 
 * Copyright (c) 2016 mo_yq5 (mo_yq5@163.com)
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
 * the Software, and to permit persons to whom the Software is furnished to do so,
 * subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 */
package com.vulgarsdk.captcha;

/**
 * 验证码发送和验证接口。
 * @author mo_yq5
 * @since 2016年1月10日
 */
public interface CaptchaVerifier {
    
    /**
     * 验证账号与验证的码的有效性
     * @param account 需要验证的账号名
     * @param captcha 验证账号的验证码
     * @return 如果验证通过则返回true，否则返回false
     */
    public boolean check(String account, String captcha);

    /**
     * 发送验证码
     * @param account 需要验证的账号名
     * @throws CaptchaException
     */
    public void send(String account) throws CaptchaException;

}

